DicomObjects.NET.8.48 Documentation
DicomObjects Namespace / DicomImage Class / Write Method / Write(Byte[],Boolean) Method

Byte Array to write image data to

If TRUE, a blank 128 byte header, DICM marker, and meta-header are written at the start of the file, and an appropriate transfer syntax is used, as below.

If FALSE, the file is written in the unofficial, but common format, with no header, and using the little-endian implicit VR transfer syntax.

Example

In This Topic
    Write(Byte[],Boolean) Method
    In This Topic
    Write the data to a Byte Array
    Syntax
    'Declaration
     
    
    Public Overloads Sub Write( _
       ByRef Array() As System.Byte, _
       ByVal isPart10 As System.Boolean _
    ) 
    public void Write( 
       out System.byte[] Array,
       System.bool isPart10
    )

    Parameters

    Array

    Byte Array to write image data to

    isPart10

    If TRUE, a blank 128 byte header, DICM marker, and meta-header are written at the start of the file, and an appropriate transfer syntax is used, as below.

    If FALSE, the file is written in the unofficial, but common format, with no header, and using the little-endian implicit VR transfer syntax.

    Remarks
    Data may be read back by the corresponding Read method.
    Example
    DicomImage image = new DicomImage("your_dicom_image.dcm");
    byte[] dicomData;
    bool isPart10 = true;
                         
    // Example: Write byte data to a DICOM file
    File.WriteAllBytes("output_image.dcm", dicomData);
    Requirements

    Target Platforms: .NET CLR 4.8 or higher

    See Also